package com.noah.project.controller

import com.noah.project.global.Const
import com.noah.project.model.Mark
import org.junit.Test
import org.junit.runner.RunWith
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit4.SpringRunner

@RunWith(SpringRunner::class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
class MarkApiControllerTest {
    @Autowired
    lateinit var markController: MarkApiController

    /*****************关注******************/
    @Test
    @Throws(Exception::class)
    fun getMarkNotes() {
        val reply = markController.getMarkNoteList(mid = 2, time = System.currentTimeMillis(), token = Const.TEST_TOKEN)
        println(reply.toString())
    }

    @Test
    @Throws(Exception::class)
    fun deleteMark() {
        val mark = Mark(mid = 2, nid = 2)
        val reply = markController.deleteMark(mark, Const.TEST_TOKEN)
        println(reply.toString())
    }

    @Test
    @Throws(Exception::class)
    fun addMark() {
        val mark = Mark(mid = 2, nid = 2)
        val reply = markController.addMark(mark, Const.TEST_TOKEN)
        println(reply.toString())
    }
}
